package com.spcloud.service.controller;

import com.spcloud.common.entity.Order;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;
import java.util.List;

/**
 * @author GuoChunbo
 * @create 2020-02-20 15:30
 * @Description: 类的描述
 */
@RestController
public class OrderController {

    /**
     * info
     */
    @GetMapping("/info")
    public String info(){

        return "Order1 Info";
    }


    /**
     *
     */
    @GetMapping("/list")
    public List<Order> orderList(){
        List<Order> orderList = new ArrayList<>();

        orderList.add(new Order(1,"订单名称1"));
        orderList.add(new Order(1,"订单名称2"));
        orderList.add(new Order(3,"订单名称3"));
        orderList.add(new Order(4,"订单名称4"));
        orderList.add(new Order(5,"订单名称5"));
        return orderList;
    }

}
